<?php
namespace tp5_lib\account\model;

use think\Model;

/**
 * 充值记录
 * @property string $id
 * @property string $user_id 要修改的用户ID
 * @property string $amount 充值
 * @property string $status 状态
 * @property string $time
 */
class RechargeModel extends Model
{
    protected $table="account_recharge";
    public function install()
    {
        $table=$this->db()->getTable();
        $sql="CREATE TABLE IF NOT EXISTS `$table` ( 
            `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , 
            `user_id` INT NOT NULL , 
            `amount` DECIMAL(10,2) NOT NULL , 
            `status` INT NOT NULL , 
            `time` INT NOT NULL
        ) ENGINE = InnoDB;";
        $this->db()->execute($sql);
    }
}
